/** layuiAdmin.std-v1.2.1 LPPL License By http://www.layui.com/admin/ */
;layui.define(["table", "form"], function(t) {
    var e = layui.$,
    	$ = layui.jquery,
        i = layui.table,
        n = layui.form;
    i.render({
        elem: "#LAY-app-content-list",
        url: "list_data.xhtml",
        cols: [[{
            type: "checkbox",
            fixed: "left"
        }, {
            field: "uuid",
            hide:true,
            title: "UIID"
        }, {
            field: "controller_name",
            title: "中控名称",
            minWidth: 100
        }, {
            field: "identified_no",
            title: "唯一标识",
            minWidth: 100
        }, {
            field: "ip_address",
            title: "IP地址"
        }, {
            field: "udp_port",
            title: "UDP端口"
        }, {
        	field: "socket_port",
        	title: "SOCKET端口"
        }, {
        	field: "udp_server_state",
        	title: "UDP服务状态",
        	templet: "#udp_server_state_view"
        }, {
        	field: "socket_server_state",
        	title: "SOCKET服务状态",
        	templet: "#socket_server_state_view"
        }, {
        	field: "openfire_username",
        	title: "openfire用户名"
        }, {
        	field: "openfire_password",
        	title: "openfire密码"
        }, {
            title: "操作",
            minWidth: 150,
            align: "center",
            toolbar: "#table-content-list"
        }]],
        page: !0,
        limit: 10,
        limits: [10, 15, 20, 25, 30],
        text: {
        	none:"暂无数据！"
        }
    }),
    i.on("tool(LAY-app-content-list)", function(t) {
        var e = t.data;
        "del" === t.event ? layer.confirm("确定删除此中控设备信息？", function(e) {
        	$.post("del.xhtml",{"uuid":t.data.uuid},function(data){
        		i.reload('LAY-app-content-list');
            });
            layer.close(e);
        }) : "edit" === t.event && layer.open({
            type: 2,
            title: "编辑",
            content: "edit.xhtml?uuid="+e.uuid,
            maxmin: !0,
            area: ["550px", "650px"],
            btn: ["确定", "取消"],
            yes: function(e, i) {
            	var l = window["layui-layer-iframe" + e],
                    a = i.find("iframe").contents().find("#layuiadmin-app-form-submit");
                a.trigger("click");
            }
        })
    }),
    t("device/controller/list", {})
});
